<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html class="no-js">
  <head>
    <meta charset="UTF-8">
    <title><?php echo C('WEB_SITE_TITLE');?></title>

    <!--IE Compatibility modes-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!--Mobile first-->
    <meta name="viewport" content="width=device-width, initial-scale=1">


    <!-- Bootstrap -->
    <link rel="stylesheet" href="__PUBLIC__/metis/assets/lib/bootstrap/css/bootstrap.min.css">

    <!-- Font Awesome -->
    <link rel="stylesheet" href="__PUBLIC__/metis/assets/lib/font-awesome/css/font-awesome.min.css">

    <!-- Metis core stylesheet -->
    <link rel="stylesheet" href="__PUBLIC__/metis/assets/css/main.min.css">

    <!-- Metis Theme stylesheet -->

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->

    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

    <!--[if lt IE 9]>
      <script src="__PUBLIC__/metis/assets/lib/html5shiv/html5shiv.js"></script>
        <script src="__PUBLIC__/metis/assets/lib/respond/respond.min.js"></script>
        <![endif]-->

    <!--For Development Only. Not required -->
    <script>
      less = {
        env: "development",
        relativeUrls: false,
        rootpath: "../assets/"
      };
    </script>
    <link rel="stylesheet" href="__PUBLIC__/metis/assets/css/style-switcher.css">
    <link rel="stylesheet/less" type="text/css" href="__PUBLIC__/metis/assets/css/less/theme.less">

    <link rel="stylesheet/less" type="text/css" href="__RES__/css/style.css">

    <script src="__PUBLIC__/metis/assets/lib/less/less-1.7.3.min.js"></script>

    <!--Modernizr 2.8.2-->
    <script src="__PUBLIC__/metis/assets/lib/modernizr/modernizr.min.js"></script>

    
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="__PUBLIC__/metis/assets/lib/datatables/3/dataTables.bootstrap.css">


  </head>
  
  <body>
    <div class="bg-dark dk" id="wrap">

      <!-- 头部 -->
      <div id="top">
  <!-- .navbar -->
  <nav class="navbar navbar-inverse navbar-static-top">
    <div class="container-fluid">

      <!-- Brand and toggle get grouped for better mobile display -->
      <header class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
          <span class="sr-only">Toggle navigation</span> 
          <span class="icon-bar"></span> 
          <span class="icon-bar"></span> 
          <span class="icon-bar"></span> 
        </button>
        <a href="index.html" class="navbar-brand">
          <img src="__PUBLIC__/metis/assets/img/logo.png" alt="">
        </a> 
      </header>
      <div class="topnav">
        <div class="btn-group">
          <a data-placement="bottom" data-original-title="全屏" data-toggle="tooltip" class="btn btn-default btn-sm" id="toggleFullScreen">
            <i class="glyphicon glyphicon-fullscreen"></i>
          </a>
        </div>

        <div class="btn-group">
          <a href="<?php echo U('Login/logout');?>" data-toggle="tooltip" data-original-title="Logout" data-placement="bottom" class="btn btn-metis-1 btn-sm">
            <i class="fa fa-power-off"></i>
          </a> 
        </div>
<!--         <div class="btn-group">
          <a data-placement="bottom" data-original-title="Show / Hide Left" data-toggle="tooltip" class="btn btn-primary btn-sm toggle-left" id="menu-toggle">
            <i class="fa fa-bars"></i>
          </a> 
          <a data-placement="bottom" data-original-title="Show / Hide Right" data-toggle="tooltip" class="btn btn-default btn-sm toggle-right"> <span class="glyphicon glyphicon-comment"></span>  </a> 
        </div> -->
      </div>
      <div class="collapse navbar-collapse navbar-ex1-collapse">

        <!-- .nav -->
<!--         <ul class="nav navbar-nav">
          <li> <a href="dashboard.html">Dashboard</a>  </li>
          <li> <a href="table.html">Tables</a>  </li>
          <li> <a href="file.html">File Manager</a>  </li>
          <li class="dropdown ">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              Form Elements
              <b class="caret"></b>
            </a> 
            <ul class="dropdown-menu">
              <li> <a href="form-general.html">General</a>  </li>
              <li> <a href="form-validation.html">Validation</a>  </li>
              <li> <a href="form-wysiwyg.html">WYSIWYG</a>  </li>
              <li> <a href="form-wizard.html">Wizard &amp; File Upload</a>  </li>
            </ul>
          </li>
        </ul> -->
        <!-- /.nav -->
      </div>
    </div><!-- /.container-fluid -->
  </nav><!-- /.navbar -->
<!--   <header class="head">
    <div class="search-bar">
      <form class="main-search" action="">
        <div class="input-group">
          <input type="text" class="form-control" placeholder="Live Search ...">
          <span class="input-group-btn">
      <button class="btn btn-primary btn-sm text-muted" type="button">
          <i class="fa fa-search"></i>
      </button>
  </span> 
        </div>
      </form>
    </div>
    <div class="main-bar">
      <h3>
        <i class="fa fa-home"></i>&nbsp; Metis</h3>
    </div>
  </header> -->
</div>
      <!-- /头部 -->

      <!-- 左边 -->
      <div id="left">
  <div class="media user-media bg-dark dker">
    <div class="user-media-toggleHover">
      <span class="fa fa-user"></span> 
    </div>
    <div class="user-wrapper bg-dark">
      <a class="user-link" href="">
        <img class="media-object img-thumbnail user-img" alt="User Picture" src="__PUBLIC__/metis/assets/img/user.gif">
        <!-- <span class="label label-danger user-label">16</span>  -->
      </a> 
      <div class="media-body">
        <h5 class="media-heading"><?php echo ($_SESSION['current_user']['username']); ?></h5>
        <ul class="list-unstyled user-info">
          <li> <a href="">系统管理员</a>  </li>
<!--           <li>Last Access :
            <br>
            <small>
              <i class="fa fa-calendar"></i>&nbsp;16 Mar 16:32</small> 
          </li> -->
        </ul>
      </div>
    </div>
  </div>

  <!-- #menu -->
  <ul id="menu" class="bg-blue dker">
<!--     <li class="nav-header">文档管理</li>
    <li class="">
      <a href="<?php echo U('Doc/index');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;文档列表</span> 
      </a> 
    </li> -->

    <li class="nav-divider"></li>
    <li class="nav-header">图片文档管理</li>
    <li class="">
      <a href="<?php echo U('PicDoc/index');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;文档列表</span> 
      </a> 
    </li>

    <li class="">
      <a href="<?php echo U('PicDoc/addPage');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;新增文档</span> 
      </a> 
    </li>

    <li class="nav-divider"></li>
    <li class="nav-header">报表</li>
    <li class="">
      <a href="<?php echo U('Report/index');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;学习时间统计</span> 
      </a> 
    </li>

<!--     <li class="">
      <a href="<?php echo U('Doc/addPicDocPage');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;新增文档</span> 
      </a> 
    </li> -->
    <li class="nav-divider"></li>
    <li class="nav-header">学员管理</li>
    <li class="">
      <a href="<?php echo U('Member/index');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;学员列表</span> 
      </a>
    </li>
     <li class="">
      <a href="<?php echo U('Member/applicationPage');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;学员申请</span>
      </a> 
     </li>

    <li class="nav-divider"></li>
    <li class="nav-header">用户管理</li>
    <li class="">
      <a href="<?php echo U('Users/index');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;用户列表</span> 
      </a> 
    </li>
    <li class="">
      <a href="<?php echo U('Users/modifyPwdPage');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;修改密码</span> 
      </a> 
    </li>
    <li class="">
      <a href="<?php echo U('Users/addUserPage');?>">
        <i class="fa fa-dashboard"></i><span class="link-title">&nbsp;用户注册</span> 
      </a> 
    </li>
    
<!--     <li>
      <a href="javascript:;">
        <i class="fa fa-exclamation-triangle"></i>
        <span class="link-title">
        Error Pages
      </span> 
        <span class="fa arrow"></span> 
      </a> 
      <ul style="height: inherit;">
        <li>
          <a href="403.html">
            <i class="fa fa-angle-right"></i>&nbsp;403</a> 
        </li>
        <li>
          <a href="404.html">
            <i class="fa fa-angle-right"></i>&nbsp;404</a> 
        </li>
      </ul>
    </li> -->

    <li><br></li>
    <li><br></li>
    <li><br></li>
    <li><br></li>
    <li><br></li>




    
    
    
  </ul><!-- /#menu -->
</div>
      <!-- /左边 -->

      <div id="content">
        <div class="outer">
          <div class="inner bg-light lter">
            <div class="col-lg-12" style="min-height: 600px;">
                <!-- 内容 -->
                

    <h3>学员列表</h3>
    <hr>

    <div class="row ui-sortable">
        <div class="col-lg-12">

            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <header>
                            <div class="icons"> <i class="fa fa-table"></i>
                            </div>
                            <h5>员工列表</h5>
                            <div class="text-right" style="padding: 5px 10px 0px 0px">
                                <!--<button type="button" id="btnExportReportData" class="btn btn-default btn-sm">导出</button>-->
                            </div>
                        </header>
                        <div class="body">
                            <table id="membersTable" class="table table-bordered table-condensed table-hover table-striped text-center">
                                <thead>
                                    <tr>
                                        <th class="text-center">#</th>
                                        <th class="text-center">员工编号</th>
                                        <th class="text-center">姓名</th>
                                        <th class="text-center">电话</th>
                                        <th class="text-center">情况</th>
                                        <th class="text-center">注册时间</th>
                                        <th class="text-center">批准时间</th>
                                        <th class="text-center">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <?php if(is_array($members)): $k = 0; $__LIST__ = $members;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$member): $mod = ($k % 2 );++$k; if($member['is_del'] == 0): ?><tr>
                                    <?php else: ?>
                                        <tr style="color: #888; text-decoration:line-through;"><?php endif; ?>
                                    
                                        
                                        <td><?php echo ($k); ?></td>
                                        <td><?php echo ($member["username"]); ?></td>
                                        <td><?php echo ($member["real_name"]); ?></td>
                                        <td><?php echo ($member["tel"]); ?></td>
                                        <td><?php echo ($member["status"]); ?></td>
                                        <td><?php echo ($member["create_time"]); ?></td>
                                        <td><?php echo ($member["approve_time"]); ?></td>
                                        
                                        
                                        
                                        <td>
                                            <?php if( $_SESSION['current_user']['group_id'] == 1 ): if($member['is_del'] == 0): ?><button 
                                                        class="btn btn-defalut btn-xs"
                                                        data-name="btnCancelMember"
                                                        data-member-uid="<?php echo ($member["id"]); ?>"
                                                        data-member-username="<?php echo ($member["username"]); ?>"
                                                        >
                                                        删除
                                                    </button>
                                                
                                                <?php else: ?>
                                                
                                                <button 
                                                        class="btn btn-default btn-xs"
                                                        data-name="btnResetMember"
                                                        data-member-uid="<?php echo ($member["id"]); ?>"
                                                        data-member-username="<?php echo ($member["username"]); ?>"
                                                        >
                                                        撤销
                                                    </button>
                                                    <button 
                                                        class="btn btn-danger btn-xs"
                                                        data-name="btnDelMember"
                                                        data-member-uid="<?php echo ($member["id"]); ?>"
                                                        data-member-username="<?php echo ($member["username"]); ?>"
                                                        >
                                                        彻底删除
                                                    </button><?php endif; endif; ?>
                                        </td>

                                    </tr><?php endforeach; endif; else: echo "" ;endif; ?>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.row -->
        </div>
    </div>

                <!-- /内容 -->
            </div>
          </div>
        </div>
      </div>


    </div><!-- /#wrap -->


    <!-- 底部 -->
    <footer class="Footer bg-dark dker">
	<p>Copyright &copy; 2014  长虹-工程技术中心</p>
</footer>
    <!-- /底部 -->

    <!-- 常量配置 -->
    <script type="text/javascript">

//可以在源码中，搜索"language"进行汉化
var dtChinese = {
	            "lengthMenu": "每页显示 _MENU_ 行数据",
	            "zeroRecords": "没有数据...",
	            "info": "当前第 _PAGE_ 页 / 共 _PAGES_ 页",
	            "infoEmpty": "没有记录...",
	            "emptyTable": "表格中没有数据",
	            "search": "搜索：",
	            "infoFiltered": "(filtered from _MAX_ total records)",
	            "paginate": {
	            	"first": "第一页",
	            	"previous": "上一页",
				    "next": "下一页",
				    "last": "最后一页"
				}
	        };
                
</script>
    <!-- /常量配置 -->

    <!--jQuery 2.1.1 -->
    <script src="__PUBLIC__/metis/assets/lib/jquery/jquery.min.js"></script>

    <!--Bootstrap -->
    <script src="__PUBLIC__/metis/assets/lib/bootstrap/js/bootstrap.min.js"></script>

    <!-- Screenfull -->
    <script src="__PUBLIC__/metis/assets/lib/screenfull/screenfull.js"></script>

    <!-- Metis core scripts -->
    <script src="__PUBLIC__/metis/assets/js/core.js"></script>

    <!-- Metis demo scripts -->
    <!--<script src="__PUBLIC__/metis/assets/js/app.min.js"></script>-->
    <!--<script src="__PUBLIC__/metis/assets/js/style-switcher.js"></script>-->

    
    <script type="text/javascript" src=""></script>

    
    
    <script src="__PUBLIC__/metis/assets/lib/datatables/jquery.dataTables.js"></script>
    <script src="__PUBLIC__/metis/assets/lib/datatables/3/dataTables.bootstrap.js"></script>

    
    <script>
        $(function () {

            $('#membersTable').dataTable({
                "scrollX": true,
                "language": dtChinese
            });
            
            $("#membersTable").delegate("[data-name='btnDelMember']", "click", function () {
                
                if(!confirm("是否要删除？")){
                    return;
                }
                
                var id = $(this).attr("data-member-uid");
                var sendData = {"id" : id};
                
                $.post("<?php echo U('delMemberInfo');?>",sendData).done(function(responseData){
                    if (responseData.status === 1) {
                        alert(responseData.info);
                        location.href = responseData.jumpUrl;
                    } else {
                        alert(responseData.info);
                    }
                });
            });
            
            $("#membersTable").delegate("[data-name='btnCancelMember']", "click", function () {
                
                if(!confirm("是否要删除？")){
                    return;
                }
                
                var id = $(this).attr("data-member-uid");
                var sendData = {"id" : id};
                
                $.post("<?php echo U('cancelMemberInfo');?>",sendData).done(function(responseData){
                    if (responseData.status === 1) {
                        alert(responseData.info);
                        location.href = responseData.jumpUrl;
                    } else {
                        alert(responseData.info);
                    }
                });
            });
            
            $("#membersTable").delegate("[data-name='btnResetMember']", "click", function () {
                
                if(!confirm("是否要撤销？")){
                    return;
                }
                
                var id = $(this).attr("data-member-uid");
                var sendData = {"id" : id};
                
                $.post("<?php echo U('resetMemberInfo');?>",sendData).done(function(responseData){
                    if (responseData.status === 1) {
                        alert(responseData.info);
                        location.href = responseData.jumpUrl;
                    } else {
                        alert(responseData.info);
                    }
                });
            });
            
            

        });

    </script>


  </body>
</html>